﻿using Ping9719.WpfEx.Mvvm;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BaseUi.ViewModel
{
    public class AboutViewModel : BindableBase
    {
        public AboutViewModel()
        {
            var versionInfo = FileVersionInfo.GetVersionInfo(LocalFile.AppPath);
            Name = versionInfo.ProductName;
            Company = $"{versionInfo.CompanyName} {versionInfo.LegalCopyright}";
            Ver = $"v {new string(versionInfo.FileVersion.Take(5).ToArray())}";
        }

        /// <summary>
        /// 程序名
        /// </summary>
        public string Name { get; set; }
        /// <summary>
        /// 公司名
        /// </summary>
        public string Company { get; set; }
        /// <summary>
        /// 版本
        /// </summary>
        public string Ver { get; set; }
    }
}
